package models

import (
	"gorm.io/gorm"
	"time"
)

type BaseModel struct {
	Id        int            `json:"id,omitempty"`
	CreatedAt time.Time      `json:"createdAt"`
	UpdatedAt time.Time      `json:"updatedAt"`
	DeletedAt gorm.DeletedAt `json:"-"`
}

type User struct {
	BaseModel
	Username string `json:"username,omitempty" gorm:"unique"`
	Password string `json:"-"`
	Gender   int    `json:"gender,omitempty"`
	Avatar   string `json:"avatar,omitempty"`
}

type NoteInfo struct {
	BaseModel
	Name   string `json:"name,omitempty"`
	Note   string `json:"note,omitempty"`
	UserId int    `json:"-"`
}
